# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=mtree-portable
pkgver=0_git20220519
pkgrel=0
_gitrev=fea79f387c592cede1217b8d019549d8d6b42235
pkgdesc="Utility for mapping and checking directory hierarchies"
url="https://github.com/jashank/mtree-portable"
arch="all"
license="BSD-3-Clause"
makedepends="autoconf automake libmd-dev libnbcompat-dev"
subpackages="$pkgname-doc"
source="https://github.com/jashank/mtree-portable/archive/$_gitrev/mtree-portable-$_gitrev.tar.gz"
builddir="$srcdir/$pkgname-$_gitrev"

prepare() {
	default_prepare

	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" docdir=/usr/share/doc/$pkgname install
}

sha512sums="
e191cf6a4dda13c9a71174648ddbc3bfbbda908821f02a0b9c470f39c87c640772111689b0b79aa633e8e48cc1671f7cdd14dde80e64bb905e179e871298d2ec  mtree-portable-fea79f387c592cede1217b8d019549d8d6b42235.tar.gz
"
